package job

import (
	"github.com/robfig/cron/v3"
	trns "jujiu/biz/trans"
	"log"
)

func InitRefreshJob() {
	cronTab := cron.New()
	cronTab.AddFunc("30 * * * *", doJob)
	cronTab.Start()
}

func doJob() {
	log.Println("do something... Every hour on the half hour")
	trns.Dispatch2Redis(false)
}
